﻿var xmlHttp_bbs;
var xmlHttp_display
function GetBbs() 
{ 
Onload(); 
  xmlHttp_bbs = GetAjax();
   var ResInfo_url = "bbs.aspx";
   xmlHttp_bbs.open("post",ResInfo_url,true);
   xmlHttp_bbs.onreadystatechange=ShowBbs;
   xmlHttp_bbs.send(null);    
}
function ShowBbs()
{
    if (xmlHttp_bbs.readyState == 4) 
     {  
       document.getElementById("bbs_state").innerHTML=xmlHttp_bbs.responseText;
     }
}
function DisplayBbs()
{
Onload();
    xmlHttp_display = GetAjax();
    var id = getParameter("id");
   var ResInfo_url = "bbsdetail.aspx?id="+id;
   xmlHttp_display.open("post",ResInfo_url,true);
   xmlHttp_display.onreadystatechange=ShowDisplay;
   xmlHttp_display.send(null);
}
function ShowDisplay()
{
    if (xmlHttp_display.readyState == 4) 
     {  
       document.getElementById("bbs_state").innerHTML=xmlHttp_display.responseText;
     }
}
function getParameter(param)
{
var query = window.location.search;
var iLen = param.length;
var iStart = query.indexOf(param);
if (iStart == -1)
   return "";
iStart += iLen + 1;
var iEnd = query.indexOf("&", iStart);
if (iEnd == -1)
   return query.substring(iStart);
return query.substring(iStart, iEnd);
}
